/*
 * @Author: byron
 * @Date: 2021-11-12 13:20:51
 * @LastEditTime: 2021-11-14 12:58:57
 */
package Menu

import (
	"github.com/gin-gonic/gin"
	api "gin-ebook/Services/v1"
	"gin-ebook/pkg/e"
	"net/http"
)

func GetMenu(c *gin.Context) {
	//code, data["token"] = api.GetMenu()
	code, data := api.GetMenu()
	//data := make(map[int]interface{})
	c.JSON(http.StatusOK, gin.H{
		"code": code,
		"msg":  e.GetMsg(code),
		"data": data,
	})
}
func GetMenuTree(c *gin.Context) {
	code, data := api.GetMenuTree()
	c.JSON(http.StatusOK, gin.H{
		"code": code,
		"msg":  e.GetMsg(code),
		"data": data,
	})
}
